import cn.weiyang.model.Emp;
import cn.weiyang.service.IEmpService;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

/**
 * Created by Administrator on 2017-7-20.
 */
public class Demo {
    @Test
    public void test1(){
        ClassPathXmlApplicationContext ac= new ClassPathXmlApplicationContext("spring/spring.xml");
        IEmpService iEmpService= (IEmpService) ac.getBean("empServiceImpl");
        List<Emp> emps=iEmpService.findAllEmp();
        for(Emp emp:emps){
            System.out.println(emp.getEname()+" "+emp.getSalary());
        }
    }
}
